﻿using Quartz;
using System;

namespace AVCJobDispatcherLinux.TaskJobEngine
{
    public class Tasks
    {
        public static IJobDetail Builder<TaskJob>(JobKey jobKey, string Id) where TaskJob : IJob
        {
            return JobBuilder.Create<TaskJob>()
                 .WithIdentity(jobKey)
                 .UsingJobData("id", Id)
                 .WithDescription(Id)
                 .Build();
        }

        public static IJobDetail BuilderWithType(JobKey jobKey, Type types, string Id)
        {
            return JobBuilder.Create(types)
                 .WithIdentity(jobKey)
                 .WithDescription(Id)
                 .Build();
        }
    }
}
